package com.cc.controller;

import com.cc.dto.BookParam;
import com.cc.entity.Book;
import com.cc.entity.BookType;
import com.cc.service.BookService;
import com.sun.org.apache.bcel.internal.generic.PUSH;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@RestController
@RequestMapping("/book")
public class BookController {
    @Autowired
    BookService bookService;
    //获取书籍列表
    @RequestMapping("/list")
    public List<Book> list(@RequestBody BookParam bookParam){
        return bookService.list(bookParam);
    }
}
